﻿<%@ page language="C#" masterpagefile="MasterPageFrame.master" autoeventwireup="true" inherits="admin_settinglist, App_Web_bgx0xzll" title="配置管理" %>

<%@ Register Src="../WebUserControl/PageNavigation.ascx" TagName="PageNavigation"
    TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<script language="javascript">
window.onload=function()
{

	document.getElementById("btnAdd").onclick=btnAdd_onclick;
	
}

function __showdialog(_t)
{

	$('#dialog').dialog({
		autoOpen: false,
		width: 600,
		resize:false,
		title:_t
	});

	$('#dialog').dialog('open');
}

function btnAdd_onclick()
{
	$form.reset("f1");
	f1.settingname.readOnly=false;
	f1.act.value="add";
	__showdialog("新增设置变量");
}
function __modify(_settingName)
{

	if (_settingName)
	{
		f1.act.value="update";
		f1.settingname.readOnly=true;
		$("#urlhref").val(location+"#"+_settingName)
		__showdialog("修改设置变量");
        //window.open("xmlsetting.aspx?settingName="+_settingName);
        $form.ElementsDataFromXML("f1","xmlsetting.aspx?settingName="+_settingName);
		
		
	}
	else
	{
		alert("请先选择要修改的设置变量");
	}
}
function __delete(_settingName)
{
	if (_settingName)
	{
		if (confirm("您镇的要删除选中的设置变量吗?"))
		{
			var url="settingdelete.aspx?settingName="+_settingName+"&urlhref="+escape(location);
			location=url;			
		}
	}
	else
	{
		alert("请先选择要删除的设置变量");
	}
}

function btnCancel_onclick()
{
	fieldset0.style.display="none";
}

function __formchecker(event)
{
	return jsformcheck(event);
}

</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <form method="get">
        <fieldset><legend>搜索</legend>
            <table>
                <tr>
                    <td><input type="text" name="keyword"/>
                    </td>
                    <td>
                        <input type="submit" value="搜索" name="btnsubmit" />
                    </td>
                </tr>
            </table>
            
        </fieldset>
    </form>
    <div class="divHelp">网站配置设定仅由网站技术开发员负责维护。</div>
    <div class="caption">
        <a class="btn" id="btnAdd">添加配置值</a>
    </div>
    <div id="pagelist1" runat="server"></div>
    <uc1:PageNavigation id="PageNavigation1" runat="server">
    </uc1:PageNavigation>
    
    <div id="dialog" title="" class="X-dialog">
	    <form name="f1" id="f1" action="settingupdate.aspx" method="post" onsubmit="javascript:return __formchecker(event);">
    	
	    <table border="0" width="100%">
	      <tr>
	        <td class="itemfield">配置名称</td>
	        <td><input type="text" style="width:500px" name="settingname" id="settingname" datatype="string" maxlength="50" alerttext="配置名称" nullabled="false"></td>
	      </tr>
	      <tr>
	        <td class="itemfield">配置说明</td>
	        <td><input type="text" style="width:500px" name="settingdescription" id="settingdescription" datatype="string" maxlength="50" alerttext="配置说明" nullabled="false"></td>
	      </tr>
	      <tr>
	        <td class="itemfield">配置值</td>
	        <td><textarea style="width:500px;height:80px" name="settingvalue" id="settingvalue"></textarea></td>
	      </tr>
	      <tr>
	        <td class="itemfield"><input type="hidden" name="act"><input type="hidden" name="urlhref" id="urlhref"></td>
	        <td>
	    	    <input type="submit" value="提交" id="btnSubmit" class="Button21">
	        </td>
	      </tr>
	    </table>
	    </form>
    </div>
</asp:Content>

